#ifndef H_GAMEPLAYSTATE
#define H_GAMEPLAYSTATE

#include "IGameState.h"
#include "SGD Wrappers/CSGD_TextureManager.h"
#include "ObjectFactory.h"
#include "ObjectManager.h"
#include <string>
using std::string;

#include "CBase.h"
#include "CPlayer.h"
#include "CEnemy.h"
#include "CCodeProfiler.h"
#include "ParticleEngine.h"
#include "CBitmapFonts.h"
#include "CInverseBlock.h"
#include "CSavePoint.h"

struct savePauseMenu
{
	bool isPaused;
	short menuIndex;
	int menuCursor;
};

class CGamePlayState : public IGameState
{
private:

	int m_nSoundID;

	ObjectFactory<string,CBase>*   m_pOF;
	ObjectManager* m_pOM;
	ParticleEngine* m_pPEngine;

	CPlayer* m_player;
	CEnemy* enemy;
	CBitmapFonts m_BMFonts;

	savePauseMenu* savePause;

	CInverseBlock* m_pInversBlock1;
	CInverseBlock* m_pInversBlock2;
	//CCodeProfiler filer;
	bool m_bInversed;
	
	bool m_bPaused;
	int m_nPauseIndex;

	CGamePlayState(void);
	CGamePlayState(const CGamePlayState&);
	CGamePlayState& operator=(const CGamePlayState&);
	~CGamePlayState(void);

public:
	static CGamePlayState* GetInstance(void);

	ObjectFactory<string,CBase>* GetFactory() { return m_pOF; } 
	ObjectManager* GetManager() { return m_pOM; } 

	savePauseMenu* GetSavePause() { return savePause; } 

	CPlayer* GetPlayer() { return m_player; }

	void Enter(void);
	bool Input(void);
	void Update(float fElapsedTime);
	void Render(void);
	void Exit(void); 
};

#endif